<!--{include /service/service_head}-->	
	<!-- End #sidebar -->
	<form action="/service/serviceTimeSearch.php" method="get">
	<div id="main-content">
		<!-- Main Content Section with everything -->
		<!-- Page Head -->
		
		<!-- End .clear -->
		<div class="content-box">
			<!-- Start Content Box -->
			<div class="content-box-header">
				<h3>ServiceTimeSearch</h3>

				<ul class="content-box-tabs" style="display:none;">
					<li><a href="#tab1" class="default-tab">详细</a></li>
					<!-- href must be unique and match the id of target div -->
					<li><a href="#tab2">编辑</a></li>
				</ul>
				<div class="clear"></div>
			</div>
			<!-- End .content-box-header -->

			<div class="content-box-content">
				<div class="login_inp">
			<ul>
				<li class="login_1 clearfix">
					<label>日付選択：</label>
					<input type="text" style="width:300" name="search_date" value="{$year}-${sprintf("%02d",$month)}-${sprintf("%02d",$day)}" onfocus="WdatePicker({lang:'jp', minDate:'${date('Y-m-d')}'})" class="Wdate"/>
					<a class="data_icon" href="javascript:;"></a>
				</li>
				<li class="login_2 clearfix">
					<label>店舗選択：</label>
					<input type="text" value="サービスサービススサービスサービスサービス" readonly="readonly" targetname="shop_id" />
					<a class="drop_icon" href="javascript:;" targetname="shop_id"></a>
					<ul class="drop_menu_m">
						${Utility::OptionLi($shopList, 'id', $defaultShopId, 'shop_name')}
					</ul>
					<input type="hidden" name="shop_id" value="{$defaultShopId}" />
				</li>
				<li class="login_3 clearfix">
					<label>サービス選択：</label>
					<input type="text" value="サービスサービススサービスサービスサービス" readonly="readonly" targetname="service_id"/>
					<a class="drop_icon" href="javascript:;" targetname="service_id"></a>
					<ul class="drop_menu_m">
						${Utility::OptionLi($serviceList, 'id', $serviceId, 'service_name')}
					</ul>
					<input type="hidden" name="service_id" value="{$serviceId}" />
				</li>
			</ul>
			<div class="stsea">
				<p><input type="submit" class="button" value="検索する" /></p>
				
				<p>{$service['service_name']}</p>
				<p>予約可能な時間</p>
				<!--{loop $canOrderTime $index $one}-->
				<p>${date("y-m-d H:i", $one['start'])}---${date("H:i", $one['end'])}</p>
				<!--{/loop}-->
				<!--{if $canOrderTime==null}-->
				<p>予約可能:全日予約ある</p>
				<!--{/if}-->
				<p><a class="button" href="/service/editOrder.php">予約</a></p>
			</div>
		</div>
			</div>
			<!-- End .content-box-content -->

		</div>
		<!-- End .content-box -->
		<!-- End .content-box -->
		<!-- End .content-box -->
		<div class="clear"></div>
		<!-- Start Notifications -->
		<!-- End Notifications -->
		<div id="footer"> <small>

			<!-- Remove this notice or replace it with whatever you want -->
			&#169; Copyright 2011 川崎エステ　エレガントリゾート　すべての女性を美しく幸せに | Powered by <a href="#">ZHONGHUA</a> | <a href="#">Top</a> </small> </div>
		<!-- End #footer -->
	</div>
	</form>
	<!-- End #main-content -->

</div>
</body>
<!-- Download From www.exet.tk-->


<script type="text/javascript">
jQuery(function(){
	$(".login_2").children(".drop_menu_m").find("a").bind("click", function(){
		$shopId = $("input[name='shop_id']");
		//console("aa");
		if( $(this).attr("value") < 1 ){
			return ;
		}
		//$shopId.val($(this).attr("val"));
		
		$.get("{$webRoot}/ajax/GetServiceList.php", "shopId=" + $shopId.val(), function(data){
			$(".login_3").children(".drop_menu_m").find("a").unbind("click");
			
			$("input[name='service_id']").val(0);
			var lis = '';
			for(var index in data.data){
				if( !index ){
					continue;
				}
				lis = lis + '<li><a href="javascript:;" value="' + index + '">' + data.data[index].service_name + '</a></li>';
			}
			$(".login_3").children(".drop_menu_m").prevAll("input").val("選択してください");
			$(".login_3").children(".drop_menu_m").html(lis);
			bindli($(".login_3").children(".drop_menu_m"));
		}, "json");
		
	});
});
jQuery(function(){
	$("select[name='shop_id']").bind("change", function(){
		if( $(this).val() < 1 ){
			return ;
		}
		$.get("{$webRoot}/ajax/GetServiceList.php", "shopId=" + $(this).val(), function(data){
			var options = '<option value="0">選択してください</option>';
			for(var index in data.data){
				if( !index ){
					continue;
				}
				options = options + '<option value="' + index + '">' + data.data[index].service_name + '</option>';
			}
			$("select[name='service_id']").html(options);
		}, "json");
		
	});
});
</script>
</html>